<?php
$all_items = &$Planet->getItems();
$current_date = date('d/m/Y', time());
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<meta http-equiv="Content-Script-Type" content="text/javascript" />
	<meta http-equiv="Content-Style-Type" content="text/css" />
	
	<title><?php echo $PlanetConfig->getName(); ?></title>
	<?php include(dirname(__FILE__).'/head.tpl.php'); ?>
</head>

<body>
    <div id="page">
        <?php include(dirname(__FILE__).'/top.tpl.php'); ?>
        
        <div id="content">
			<h2>Today</h2>
			<ul class="cheese">
				<?php foreach ($all_items as $item): ?>
					<?php
					if (($item_date = date('d/m/Y',$item->getDate())) != $current_date){
						$current_date = $item_date;
						echo '</ul>';
						echo '<h2>'.$item_date.'</h2>';
						echo '<ul>';
					}
					?>
					<?php $owner = $item->getOwner(); ?>
					<li>
					<a href="<?php echo $owner->getWebsite(); ?>"><?php echo $owner->getName(); ?></a> : 
					<a href="<?php echo $item->getUrl(); ?>" title="Go to original place"><?php echo $item->getTitle(); ?></a>
					</li>
				<?php endforeach; ?>
			</ul>
        </div>
        
        <?php include_once(dirname(__FILE__).'/sidebar.tpl.php'); ?>
        
        <?php include(dirname(__FILE__).'/footer.tpl.php'); ?>
    </div>
</body>
</html>